using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Drawing
{
    public class Rectangle : Shape
    {
        private Vector2 startPosition;
        private Vector2 endPosition;
        private Color drawColor;
        public Rectangle(Vector2 start, Vector2 end, Color color)
        {
            startPosition = start;
            endPosition = end;
            drawColor = color;

            PrivitiveType = PrimitiveType.LineList;
            Vertices.Add(new VertexPositionColor(new Vector3((float)startPosition.X, (float)startPosition.Y, 0), drawColor));
            Vertices.Add(new VertexPositionColor(new Vector3((float)endPosition.X, (float)startPosition.Y, 0), drawColor));
            Vertices.Add(new VertexPositionColor(new Vector3((float)endPosition.X, (float)startPosition.Y, 0), drawColor));
            Vertices.Add(new VertexPositionColor(new Vector3((float)endPosition.X, (float)endPosition.Y, 0), drawColor));
            Vertices.Add(new VertexPositionColor(new Vector3((float)endPosition.X, (float)endPosition.Y, 0), drawColor));
            Vertices.Add(new VertexPositionColor(new Vector3((float)startPosition.X, (float)endPosition.Y, 0), drawColor));
            Vertices.Add(new VertexPositionColor(new Vector3((float)startPosition.X, (float)endPosition.Y, 0), drawColor));
            Vertices.Add(new VertexPositionColor(new Vector3((float)startPosition.X, (float)startPosition.Y, 0), drawColor));
        }



    }
}
